import request from '@/utils/request'

const api_path =`/api/hosp/hospital` //固定路径

export default {
    //查询医院列表
    getPageList(page,limit,searchObj){
        return request ({
            url: `${api_path}/findHospList/${page}/${limit}`,
            method: 'post',
            params:searchObj
        })
    },
    //根据医院的名称，进行模糊查询
    getByHosname(hosname){
        return request ({
            url: `${api_path}/findByHosName/${hosname}`,
            method: 'get'
        })
    },
    //根据医院编号获取医院预约挂号的详情
    findHospDetail(hoscode){
        return request ({
            url: `${api_path}/findHospDetail/${hoscode}`,
            method: 'get'
        })
    },
    //根据医院编号获取科室
    findDepartment(hoscode){
        return request ({
            url: `${api_path}/findDepartment/${hoscode}`,
            method: 'get'
        })
    }
    ,
    //获取可预约信息
    getBookingScheduleRule(page, limit, hoscode, depcode) {
        return request({
            url: `${api_path}/auth/getBookingScheduleRule/${page}/${limit}/${hoscode}/${depcode}`,
            method: 'get'
        })
    },
    //获取排班信息
    findScheduleList(hoscode, depcode, workDate) {
        return request({
            url: `${api_path}/auth/findScheduleList/${hoscode}/${depcode}/${workDate}`,
            method: 'get'
        })
    },

    //根据排班id获取排班信息
    getSchedule(id) {
        return request({
            url: `${api_path}/getSchedule/${id}`,
            method: 'get'
        })
    }
}